<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
	<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=iso-8859-1">
	<TITLE>Dataxi-printing-HOWTO</TITLE>
	<META NAME="GENERATOR" CONTENT="OpenOffice.org 1.0.2  (Linux)">
	<META NAME="CREATED" CONTENT="20030716;9343600">
	<META NAME="CHANGED" CONTENT="20030716;9424100">
	<META NAME="DESCRIPTION" CONTENT="Dataxi-printing-HOWTO">
	<META NAME="KEYWORDS" CONTENT="dataxi-printing-howto">
	<META NAME="resource-type" CONTENT="document">
	<META NAME="distribution" CONTENT="global">
</HEAD>
<BODY LANG="en-GB">
<H1 ALIGN=CENTER><B>Dataxi-printing-HOWTO</B></H1>
<ADDRESS STYLE="text-align: center">by Jyry Kuukkanen</ADDRESS>
<H3>1 <SPAN LANG="en-GB">Introduction</SPAN></H3>
<P>Dataxi provides tools to produce PDF documents with ease. 
</P>
<P>Using dzDocPrint object, it is possible to print any set in
database based on the layout described in a template file. 
</P>
<P>This howto describes the template file format and the usage of
dzDocPrint. 
</P>
<H3>2 dzDocPrint template file 
</H3>
<P>The template file is nothing but simple ini style text file. It
consists of sections and key=value or key={ valueset } pairs. 
</P>
<P>A value set is actually in the form of 
</P>
<PRE STYLE="margin-left: 1cm; margin-right: 1cm">key={ 
subkey=value 
subkey2=value2 
}</PRE><P>
The Dataxi print document consists of head, details, totals and
images blocks. Before going to details, below is a brief<SPAN LANG="en-GB">
description </SPAN>of each of them. 
</P>
<P>&quot;head&quot; is printed on every page and may contain text and
fields anywhere on the document. 
</P>
<P>&quot;details&quot; is row printing that may continue to as many
pages as required. &quot;details&quot; consists of sections that is
divided into rows and each row into memo-rows. This enables printing
of memos without the fear of<SPAN LANG="en-GB"> overlapping </SPAN>with
other text and printing of row data that does not fit on one line. 
</P>
<P>&quot;totals&quot; is a special case of &quot;details&quot;
printing that acts pretty much the same but is printed right after
the &quot;details&quot;. In other words, anything that should be
printed right after the actual rows should go here. 
</P>
<P>&quot;images&quot; is, like the name suggests, printing of images,
logos. Each image defines must reside in a file and supported formats
are up to the PHP interpreter. Common formats compiled with PHP
include png, jpeg and tiff. 
</P>
<P>The template file<SPAN LANG="en-GB"> describes </SPAN>the blocks
above in sections, but there are other sections, too, which deal with
common or generic issues. Each section and it's function is<SPAN LANG="en-GB">
described </SPAN>below. 
</P>
<H3>2.1 [dztables] section 
</H3>
<P>In order to retrieve data off from the database, the data
structure of the document must be defined. The format in this
sections is identical to the one that can be found in
Dataxi-kone-howto in full. Please refer to that for details. 
</P>
<H3>2.2 [sys] section 
</H3>
<P>This contains most generic information about the document and the
actual template file. 
</P>
<H4>2.2.1 unit 
</H4>
<P>In which unit the co-ordinates for any printable text of field are
presented in the template file? Set this to &quot;mm&quot; if the x's
and y's are<SPAN LANG="en-GB"> described </SPAN>in millimetres. Other
units are &quot;cm&quot;, &quot;m&quot;, &quot;pts&quot; (points, 72
per inch) and &quot;inch&quot;. 
</P>
<H4>2.2.2 locale</H4>
<P>Two letter locale string that affects how numbers, date and time
is printed. For example, set this to &quot;fi&quot; if you want to
use Finnish style locale (comma as decimal separator, dot as thousand
separator, dates as d.m.yyyy and time in 24h format. 
</P>
<H3>2.3 [styles] section 
</H3>
<H3>2.4 [image] section 
</H3>
<H3>2.5 [head] section 
</H3>
<H3>2.6 [details] section 
</H3>
</BODY>
</HTML>